/*
 * This file is part of "Sorting Thoughts" project.
 *
 * Copyright (c) 2010 Hendrik Ebel
 * All Rights Reserved.
 *
 * Please visit http://code.google.com/p/sorting-thoughts/ for more information.
 *
 * --LICENSE NOTICE--
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 3
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; If not, see <http://www.gnu.org/licenses/>.
 * --LICENSE NOTICE--
 */
function HelpAssistant(){
}

HelpAssistant.prototype.setup = function(){
	this.controller.setupWidget(Mojo.Menu.appMenu, this.attributes = {
		omitDefaultItems: true
		}, this.model = {
		visible: false	
		}
	);
	
	// add command menu
	if (SortingThoughts.isTouchPad()) {
		this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, {
			items: [{
				label: 'Back',
				command: 'backToOverview',
				icon: 'back'
			}]
		});
	}
	
	this.controller.get('appname').innerHTML = SortingThoughts.appName;
	this.controller.get('copyright').innerHTML = SortingThoughts.copyright;
};

HelpAssistant.prototype.handleCommand = function(event){
    if (event.type == Mojo.Event.command) {
        switch (event.command) {
			case 'backToOverview':
				event.stopPropagation();
				this.controller.stageController.popScene();
				break;
        }
    }
};

HelpAssistant.prototype.activate = function(event){
};

HelpAssistant.prototype.deactivate = function(event){
};

HelpAssistant.prototype.cleanup = function(event){
};
